<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Shop;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class Coupon
 *
 * @property int $id
 * @property string $name
 * @property float $coupon_money
 * @property float $use_ordermoney
 * @property int $publish_number
 * @property int $receive_number
 * @property Carbon $expire_at
 * @property Carbon $start_at
 * @property int $version
 * @property string $type
 * @property Carbon $created_at
 * @property Carbon $updated_at
 *
 * @package App\Models
 */
class Coupon extends Model
{
	protected $table = 'coupons';

	protected $casts = [
		'coupon_money' => 'float',
		'use_ordermoney' => 'float',
		'publish_number' => 'int',
		'receive_number' => 'int',
		'version' => 'int'
	];

	protected $dates = [
		'expire_at',
		'start_at'
	];

	protected $fillable = [
		'name',
		'coupon_money',
		'use_ordermoney',
		'publish_number',
		'receive_number',
		'expire_at',
		'start_at',
		'version',
		'type'
	];
}
